package com.example.dbg.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.dbg.mapper.CuUserMapper;
import com.example.dbg.model.po.CuUser;
import com.example.dbg.service.ICuUserService;
import org.springframework.stereotype.Service;


/**
 * @user DBG_ZXX
 * @date 2018/10/28 12:18
 * @desc
 **/
@Service
public class CuUserServiceImpl extends ServiceImpl<CuUserMapper, CuUser> implements ICuUserService {


    @Override
    public CuUser login(String loginName , String loginPwd) {
        return getOne(new QueryWrapper<CuUser>()
                .eq("login_name" ,loginName)
                .eq("login_pwd", loginPwd));
    }

    @Override
    public CuUser selectById(int id) {
        return getById(id);
    }
}
